V2EX  ›  英汉词典

Program Correctness

释义 Definition(中文)

程序正确性:指一个程序在所有规定的输入条件下,能够满足其规格说明(specification)并产生符合预期的输出与行为的性质。常见讨论包括:是否对所有情况都算对(部分/完全正确性)、是否一定会结束(终止性)等。

发音 Pronunciation(IPA)

/ˈproʊɡræm ˈkɔːrɛktnəs/

例句 Examples

A correct program gives the right output for every valid input.
一个正确的程序会对每一个有效输入给出正确输出。

To prove program correctness, engineers often define precise specifications and use invariants to show the code meets them in every step.
为了证明程序正确性,工程师常会先给出精确的规格说明,并使用不变式来证明代码在每一步都满足这些要求。

词源 Etymology(中文)

program 来自希腊语 programma(“公开写下的东西、公告”),经由拉丁语与法语进入英语,后来在现代语境中扩展为“计算机程序”。
correctnesscorrect(正确的,源自拉丁语 correctus,意为“纠正过的”)加名词后缀 -ness 构成,表示“正确这一性质”。合在一起即“程序的正确性/正确程度”。

相关词 Related Words

文学与作品 Literary Works(出现语境示例)

  • The Art of Computer Programming(Donald E. Knuth):在算法分析与严谨推理语境中常涉及“正确性”讨论。
  • Structure and Interpretation of Computer Programs(Harold Abelson & Gerald Jay Sussman):在用抽象与推理理解程序行为时频繁触及正确性思想。
  • Introduction to Algorithms(Cormen, Leiserson, Rivest, Stein):在算法章节中常以“correctness proof(正确性证明)”为核心结构。
  • Software Engineering(Ian Sommerville):在软件质量与验证/确认部分讨论程序与系统的正确性与保障方法。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   823 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 22:59 · PVG 06:59 · LAX 14:59 · JFK 17:59
♥ Do have faith in what you're doing.